<!--  -->
<template>
  <a-modal
    @cancel="modalClose"
    :visible="visible"
    width="600px"
    wrapClassName="mark-modal"
    :footer="null"
    :centered="true"
  >
    <div class="mark-wrap">
      <a-textarea
        v-model="mark.mark_content"
        class="content-area"
        placeholder="填写笔记"
      />
      <div class="btn-group">
        <a-button type="primary" shape="round" @click="okClickHandle">保存笔记</a-button>
        <a-button type="primary" shape="round" @click="modalClose">取消</a-button>
      </div>
    </div>
  </a-modal>
</template>

<script>
import { Modal, Input } from "ant-design-vue";
export default {
  name: "markModal",
  components: {
    AModal: Modal,
    ATextarea: Input.TextArea,
  },
  data() {
    return {};
  },
  props: {
    visible: {
      type: Boolean,
      required: true,
    },
    mark: {
      type: Object,
      default: () => {
        return {};
      },
    },
    ok: {
      type: Function,
    },
  },
  computed: {},
  watch: {},
  methods: {
    modalClose() {
      this.$emit("update:visible", false);
    },
    okClickHandle() {
      this.$emit("ok", this.mark);
    },
  },
  created() {},
  mounted() {},
};
</script>
<style lang="less" scoped>
/* @import url(); 引入公共css类 */

.mark-modal {
  overflow: auto;
  .mark-wrap {
    padding-top: 30px;
    .content-area {
      height: 200px;
    }
    .btn-group {
        text-align: center;
        margin-top: 20px; /* no */
        .ant-btn {
            margin: 0 20px; /* no */
        }
    }
  }
}
</style>
